using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Windows;
using OnlinePlots.Diagrams;

namespace OnlinePlots.Plots.Elements
{
    public enum VerticalLabelStripPosition
    {
        LeftBorder = 0,
        RightBorder = 1,
        AxisGridLine = 2,
        RightmostGridLine = 3,
        LeftmostGridLine = 4
    }

    /// <summary>
    /// Represents vertical label strip element of the plot
    /// </summary>
    public class VerticalLabelStripElement : LabelStripElement
    {
        /// <summary>
        /// Creates a new instance of vertical label strip element
        /// </summary>
        public VerticalLabelStripElement()
            : base()
        {
        }

        public static readonly DependencyProperty PositionProperty = DependencyProperty.Register(
                        "Position",
                        typeof(VerticalLabelStripPosition),
                        typeof(VerticalLabelStripElement),
                        new PropertyMetadata(VerticalLabelStripPosition.AxisGridLine, new PropertyChangedCallback(OnPositionPropertyChanged))
                    );

        /// <summary>
        /// Gets or sets vertical label strip position
        /// </summary>
        public VerticalLabelStripPosition Position
        {
            get { return (VerticalLabelStripPosition)GetValue(PositionProperty); }
            set { SetValue(PositionProperty, value); }
        }

        static protected void OnPositionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DiagramElement el = d as DiagramElement;
            el.NotifyPropertyChanged("Position");
        }
    }
}
